package lab02.test28;

import java.util.InputMismatchException;
import java.util.Scanner;

public class Test28 {
    public static void main(String[] args) {
        System.out.println("请输入一个double型圆的半径：");
        try {
            Scanner a = new Scanner(System.in);
            double radius = a.nextDouble();
            double circle;
            circle = 3.14 * radius * radius;
            System.out.println(circle);
        }catch (InputMismatchException e){
            System.out.println("输入数据类型有误");
        }
    }
}